<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/include/header.jsp" %>
<%-- 커뮤니티 회원 관리하는 페이지 --%>
<div width="980px">
<table border="0" cellpadding="0" cellspacing="0" width="980px">
	<tr>
		<td style="vertical-align: top;width: 180px;background-color: #fdb32a;">
			<%@ include file="adminmenu.jsp"%>
		</td>
		<td style="width: 800px;text-align: center;">
		<div>
			<div style="height: 10px;"></div>
			<table style="width: 800px;text-align: left;" cellpadding="0" cellspacing="0">
				<tr>
					<td style="width: 600px;text-align: center;vertical-align: top;">
						<div style="width: 500px;height: 40px;padding-bottom: 10px;">
								<img src="<%=imagePath %>commadmin_member_02.jpg" border="0"/>
						</div>
						<table style="width: 500px;" cellpadding="0" cellspacing="0">
							<tr>
								<td style="width: 100px;height: 20px;"><img src="<%=imagePath %>commadmin_member_04.jpg" border="0" style="height: 20px;"/></td>
								<td style="width: 150px;height: 20px;"><img src="<%=imagePath %>commadmin_member_05.jpg" border="0" style="height: 20px;"/></td>
								<td style="width: 150px;height: 20px;"><img src="<%=imagePath %>commadmin_member_06.jpg" border="0" style="height: 20px;"/></td>
								<td style="width: 50px;height: 20px;"><img src="<%=imagePath %>commadmin_member_07.jpg" border="0" style="height: 20px;"/></td>
								<td style="width: 50px;height: 20px;"><img src="<%=imagePath %>commadmin_member_08.jpg" border="0" style="height: 20px;"/></td>
							</tr>						
						</table>
						
						<table style="width: 500px;border: 1px solid #fdb32a;border-top: 0px;" cellpadding="0" cellspacing="0">
							<logic:iterate id="mc" name="communityForm" property="memberCommunitys" type="model.MemberCommunity">
								<tr>
									<td class="commMemberTd"  style="width: 100px;"><bean:write name="mc" property="mid"/></td>
									<td class="commMemberTd"  style="width: 150px;"><bean:write name="mc" property="mcnick"/></td>
										<form id="<bean:write name="mc" property="mid"/>">
									<td class="commMemberTd" style="width: 150px;">
											<html:select name="mc" property="lvno" styleClass="commMemberMultibox">
												<html:option value="1">일반회원</html:option>
												<html:option value="7">동호회관리자</html:option>
											</html:select>
									</td>
										</form>
									<td class="commMemberTd"  style="width: 50px;">
										<img src="<%=imagePath %>commadmin_member_10.jpg" border="0" onclick="memberupdate('<bean:write name="mc" property="mid"/>');"/></td>
									<td class="commMemberTd"  style="width: 50px;">
										<img src="<%=imagePath %>commadmin_member_11.jpg" border="0" onclick="memberdelete('<bean:write name="mc" property="mid"/>');"/></td>
								</tr>
							</logic:iterate>
							<tr>
								<td colspan="5">
									<jsp:include page="memberpager.jsp">
										<jsp:param name="url" value="/community/communityinfo.do?method=getMember"/>
									</jsp:include>
								</td>
							</tr>
						</table>
					</td>
					<td style="width: 200px;height: 500px;">
						<img src="<%=imagePath %>commadmin_info_04.jpg" border="0">
					</td>
				</tr>
			</table>
			</div>
		</td>
	</tr>
</table>
<script type="text/javascript">
	//회원의 등급을 변경할때
	function memberupdate(mid){	
		var levelForm = document.getElementById(mid);
		var lvno = levelForm.lvno.value;

		location.href = "<%=path%>/community/communityinfo.do?method=memberupdate&mid="+mid+"&lvno="+lvno+"&cono=<%=request.getParameter("cono")%>";
	}
	
	//회원를 삭제할때 
	function memberdelete(mid){
		location.href = "<%=path%>/community/communityinfo.do?method=memberdelete&mid="+mid+"&cono=<%=request.getParameter("cono")%>";		
	}
</script>
</div>
<%@ include file="../common/include/footer.jsp" %>